<div class = "pt-table-wrap">
    <h4 class = "pt-msg-title"><b class="f-fl">{$typename}管理</b><span><a href = "__URL__/add" class = "btn btn-success btn-sm f-fr">添加{$typename}</a></span></h4>
    <div class = "pt-search-area">
        <p class = "tips">请输入相关关键词，然后选择相应的搜索选项搜索{$typename}( <font color = "red ">您可以在关键词前后使用匹配符*(任意字符)、?(一个字符)</font>)。</p>
        <div class = "pt-search-box">
            <form action = "__URL__/index" method = "get">
                <strong>搜索{$typename}：</strong>
                <select name = "searchtype" class = "input-box">
                    <option value = "title">标题</option>
                </select>
                <input name = "searchkey" class = "input-text w160" type = "text" />
                <input type = "submit" class = "btn btn-primary btn-sm" value = "搜索" />
            </form>
        </div>
    </div>
    <div class = "pt-list">
        <div class="pt-list-title">
            <p class = "f-fl tips">
                {if $searchkey==''}当前条件下{else}搜索关键词 <b class="c-red">{$searchkey}</b> 的结果{/if}共有<b class="c-red"> {$totalnum} </b>篇{$typename}
            </p>
            <div class = "bulk-actions f-fr">
                过滤条件
                <select class="input-box" data="category_id">
                    <option value = "">所有分类</option>
                </select>
                <select class="input-box" data="status">
                    <option value = "">全部状态</option>
                    <option value = "1">已发布</option>
                    <option value = "0">草稿箱</option>
                </select>&nbsp;&nbsp;
                排序
                <select class="input-box" data="order">
                    <option value = "id">入库时间</option>
                    <option value = "datetime">发布时间</option>
                    <option value = "weight">权重</option>
                </select>
                <select class="input-box" data="sort">
                    <option value = "0">正序</option>
                    <option value = "1" selected = "">倒序</option>
                </select>
            </div>
        </div>
        <div class = "f-clear"></div>
        <form method = "post" action="__URL__/multi" id="showtable">
            <table class = "pt-list-table">
                <thead>
                <tr>
                    <th class="w-checkbox"><input type = "checkbox" class="checkall" data="id[]"></th>
                    <th class = "w-id">ID</th>
                    <th class="w-word4">分类</th>
                    <th class="f-tal">标题</th>
                    <th class= "w-fulltime">发布时间</th>
                    <th class = "w-word3">状态</th>
                    <th class = "w-word2">权重</th>
                    <th class = "operate w-operate2">操作</th>
                </tr>
                </thead>
                <tbody>
                {loop="list"}
                <tr>
                    <td><input type = "checkbox" name = "id[]" value = "{$loop.id}"></td>
                    <td>{$loop.id}</td>
                    <td>{$loop.category_id|dc::category='name'}</td>
                    <td class="f-tal"><a href = "javascript:;" target = "_blank" title="{$loop.title}">{$loop.title|truncate="40",'...'}</a></td>
                    <td>{$loop.datetime|date="Y-m-d H:i:s"}</td>
                    <td>{$loop.status|default='<span class="label label-warning">草稿箱</span>','<span class="label label-success">已发布</span>','<span class="label label-primary">待发布</span>'}</td>
                    <td>{$loop.weight}</td>
                    <td class = "operate">
                        <a href="__URL__/edit/id/{$loop.id}"><i class="icon icon-edit"></i>编辑</a>
                        <a href="javascript:del('{$loop.id}');"><i class="icon icon-trash"></i>删除</a>
                    </td>
                </tr>
                {/loop}
                </tbody>
            </table>
            <div class="pt-list-footer">
                <div class = "f-fl">
                    <select name = "dooperate" class="input-box">
                        <option value = "del">删除所选</option>
                    </select>
                    <input type = "button" class = "btn btn-primary btn-sm" value = "批量操作"  onclick="checkselt('id[]','showtable')">
                </div>
                <div class = "pt-page f-fr">
                    {$pagestr}
                </div>
                <div class = "f-clear"></div>
            </div>
        </form>
        <div class = "clear"></div>
    </div>
</div>